package com.sky.mapper.user;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository("userOrderDetailMapper")
@Mapper
public interface OrderDetailMapper {

    /**
     * 根据订单id查询详情
     * @param id
     * @return
     */
    List<OrderDetail> selectById(Long id);



    /**
     * 查询订单数列表
     * @param map
     * @return
     */
    @MapKey("name")
    List<Map<String, Long>> queryTheTopTenSales(Map<Object, Object> map);



}
